﻿using System;
using System.Collections;
using System.Collections.Generic;
using Socium.Presentation;

namespace Socium {
	class SelectionViewModel : PageViewModel {
		public SelectionViewModel(string display_name, object items) : base(display_name) {
			var enumerble = items as IEnumerable;
			if (enumerble == null) {
				throw new ArgumentException();
			}

			foreach (var o in enumerble) {
				_items.Add(o);
			}
		}

		#region Items

		readonly ICollection<object> _items = new LinkedList<object>();

		public IEnumerable Items {
			get { return _items; }
		}

		#endregion


		#region SelectedItem

		object _selected_item;

		public object SelectedItem {
			get { return _selected_item; }
			set {
				_selected_item = value;
				OnPropertyChanged("SelectedItem");
			}
		}

		#endregion
	}
}
